//
//  nbl_optCallback.h
//  nbl_SDK
//
//  Created by Real on 16/8/29.
//  Copyright © 2016年 newunity. All rights reserved.
//

#ifndef nbl_optCallback_h
#define nbl_optCallback_h


#import "nbl_optResult.h"
#import "nbl_lockStat.h"
#import "nbl_lockInfo.h"
#import "nbl_lockEvidences.h"
#import "nbl_optRecord.h"

// 蓝牙锁操作监听协议
@protocol nbl_optCallback <NSObject>

@optional
// 蓝牙锁初始化操作回调
-(void) onInitLock: (nonnull nbl_optResult*) result;

// 修改客户侧安全码操作回调
-(void) onChangeCPWD: (nonnull nbl_optResult*) result;

// 修改锁的默认密码操作回调
-(void) onChangeDefaultCPWD: (nonnull nbl_optResult*) result;

// 查找目标锁操作回调
-(void) onFindObjectLock: (nonnull nbl_optResult*) result;

// 蓝牙锁开锁操作回调
-(void) onOpenLock: (nonnull nbl_optResult*) result;

// 蓝牙锁上锁操作回调
-(void) onCloseLock: (nonnull nbl_optResult*) result;

// 读取蓝牙锁操作记录回调
-(void) onGetRecords: (nonnull nbl_optResult*) result
             records: (nullable NSArray<nbl_optRecord*>*) records;

// 删除蓝牙锁操作记录回调
-(void) onDelRecords: (nonnull nbl_optResult*) result;

// 修改蓝牙锁时间操作回调
-(void) onSetTime: (nonnull nbl_optResult*) result;

// 添加开门密码操作回调
-(void) onAddPwd: (nonnull nbl_optResult*) result
           pwdID: (uint8_t) pwdID;

// 开门密码延期操作回调
-(void) onExtPwd: (nonnull nbl_optResult*) result;

// 添加感应卡操作回调
-(void) onAddCard: (nonnull nbl_optResult*) result
           cardID: (uint8_t) cardID;

// 感应卡延期操作回调
-(void) onExtCard: (nonnull nbl_optResult*) result;

// 查询感应卡和密码操作回调
-(void) onQryEvidence: (nonnull nbl_optResult*) result
            evidences: (nullable nbl_lockEvidences*) evidences;

// 删除指定的感应卡和密码操作回调
-(void) onDelEvidences: (nonnull nbl_optResult*) result;

// 删除所有的感应卡和密码操作回调
-(void) onDelAllEvidences: (nonnull nbl_optResult*) result;

// 读取蓝牙锁状态操作回调
-(void) onGetLockStat: (nonnull nbl_optResult*) result
             lockStat: (nullable nbl_lockStat*) stat;

// 读取蓝牙锁信息操作回调
-(void) onGetLockInfo: (nonnull nbl_optResult*) result
             lockInfo: (nullable nbl_lockInfo*) info;

// 设置蓝牙锁状态操作回调
-(void) onSetLockStat: (nonnull nbl_optResult*) result;

// 禁止蓝牙锁随机密码功能操作回调
-(void) onForbidRamdomPwd: (nonnull nbl_optResult*) result;

// 开启蓝牙锁随机密码功能操作回调
-(void) onAllowRamdomPwd: (nonnull nbl_optResult*) result;

// 保持蓝牙锁连接操作回调
-(void) onKeepLock: (nonnull nbl_optResult*) result;

// 添加表的回调
-(void)onAddTable: (nonnull nbl_optResult*) result;

// 查询表操作回调
-(void)onQryTable: (nonnull nbl_optResult*) result;

// 删除表操作回调
-(void)onDeleteTable: (nonnull nbl_optResult*) result;

// 拉合闸操作回调
-(void)onSwitchTable: (nonnull nbl_optResult*) result;

// 读取水电表月冻结数据操作回调
-(void)onFreezeTableData: (nonnull nbl_optResult*) result freezeTableData:(uint8_t) tableNum ;

// 读取水电表当前数据操作回调
-(void)onCurrentMonthTableData: (nonnull nbl_optResult*) result currentTableNumber:(uint8_t) tableNum ;

@end


#endif /* nbl_optCallback_h */
